package router

import (
	"fx_swift_agent/internal/controller"
	"fx_swift_agent/pkg/upload"
	"github.com/gin-gonic/gin"
)

var miniApiVer *gin.RouterGroup

func InitRouter(g *gin.Engine) {
	installController(g)
}

func installController(engine *gin.Engine) {
	miniApiVer = engine.Group("api/cardAgent")

	miniApiVer.POST("register", controller.Register)
	miniApiVer.POST("login", controller.Login)
	miniApiVer.POST("forgetPassword", controller.ForgetPassword)
	miniApiVer.POST("updatePassword", controller.UpdatePassword)

	miniApiVer.GET("sendMailCode", controller.SendMailCode)
	miniApiVer.GET("getCountryInfo", controller.GetCountryInfo)
	miniApiVer.GET("getCardCountryInfo", controller.GetCardCountryInfo)
	miniApiVer.GET("getCompanyType", controller.GetCompanyType)

	miniApiVer.GET("emailIsExit", controller.EmailIsExit)
	miniApiVer.GET("testOne", controller.TestOne)

	miniApiVer.POST("uploaderToS3", upload.UploadToS3)
	miniApiVer.POST("uploader", upload.BatchUpload)

	miniApiVer.POST("getCardHead", controller.GetCardHead)
	miniApiVer.POST("manualCardRechargeRecord", controller.ManualCardRechargeRecord)
	miniApiVer.POST("deductionAgentBalance", controller.ManualDeductionAgentBalance)

	UserRouter()
	AgentRouter()
	IndexRouter()
	CardRouter()
	NotifyRouter()
}
